package nju.mscs.gui;

import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;
import javax.swing.event.AncestorEvent;
import javax.swing.event.AncestorListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

import nju.mscs.server.businessLogic.PM;
import nju.mscs.server.businessLogic.PromotionManager;
import nju.mscs.server.businessLogic.SC;
import nju.mscs.server.businessLogic.SearchController;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Bargain extends javax.swing.JFrame {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}

	private JTabbedPane jTabbedPane1;
	private JPanel jPanel1;
	private JLabel jLabel4;
	private JTextField jTextField6;
	private JButton jButton17;
	private JLabel jLabel8;
	private JSeparator jSeparator6;
	private JButton jButton14;
	private JButton jButton11;
	private JButton jButton7;
	private JTextField jTextField12;
	private JLabel jLabel5;
	private JTextField jTextField3;
	private JLabel jLabel3;
	private JButton jButton19;
	private JButton jButton18;
	private JLabel jLabel70;
	private JTable jTable5;
	private JButton jButton16;
	private JButton jButton15;
	private JTable jTable4;
	private JLabel jLabel67;
	private JComboBox jComboBox16;
	private JLabel jLabel66;
	private JComboBox jComboBox15;
	private JLabel jLabel65;
	private JTextField jTextField36;
	private JLabel jLabel64;
	private JComboBox jComboBox14;
	private JLabel jLabel63;
	private JComboBox jComboBox13;
	private JTextField jTextField35;
	private JLabel jLabel62;
	private JLabel jLabel61;
	private JTextField jTextField33;
	private JLabel jLabel59;
	private JTextField jTextField29;
	private JLabel jLabel54;
	private JSeparator jSeparator5;
	private JTextField jTextField28;
	private JLabel jLabel53;
	private JLabel jLabel52;
	private JTextField jTextField27;
	private JLabel jLabel51;
	private JTextField jTextField26;
	private JLabel jLabel49;
	private JButton jButton13;
	private JButton jButton12;
	private JTable jTable3;
	private JButton jButton10;
	private JLabel jLabel47;
	private JComboBox jComboBox12;
	private JLabel jLabel46;
	private JComboBox jComboBox11;
	private JLabel jLabel45;
	private JTextField jTextField23;
	private JLabel jLabel44;
	private JComboBox jComboBox10;
	private JLabel jLabel43;
	private JComboBox jComboBox9;
	private JLabel jLabel42;
	private JTextField jTextField22;
	private JLabel jLabel41;
	private JTextField jTextField18;
	private JLabel jLabel36;
	private JTextField jTextField17;
	private JLabel jLabel35;
	private JTextField jTextField15;
	private JLabel jLabel32;
	private JTextField jTextField14;
	private JLabel jLabel31;
	private JTextField jTextField13;
	private JLabel jLabel30;
	private JButton jButton9;
	private JButton jButton8;
	private JButton jButton6;
	private JButton jButton5;
	private JTable jTable2;
	private JLabel jLabel26;
	private JComboBox jComboBox8;
	private JLabel jLabel25;
	private JComboBox jComboBox7;
	private JLabel jLabel24;
	private JTextField jTextField11;
	private JLabel jLabel23;
	private JComboBox jComboBox6;
	private JLabel jLabel22;
	private JComboBox jComboBox5;
	private JLabel jLabel11;
	private JComboBox jComboBox1;
	private JLabel jLabel10;
	private JLabel jLabel21;
	private JTextField jTextField10;
	private JLabel jLabel20;
	private JTextField jTextField9;
	private JLabel jLabel18;
	private JTextField jTextField8;
	private JLabel jLabel17;
	private JLabel jLabel16;
	private JButton jButton4;
	private JButton jButton3;
	private JTable jTable1;
	private JSeparator jSeparator2;
	private JButton jButton2;
	private JButton jButton1;
	private JLabel jLabel15;
	private JComboBox jComboBox4;
	private JLabel jLabel14;
	private JComboBox jComboBox3;
	private JLabel jLabel13;
	private JTextField jTextField7;
	private JLabel jLabel12;
	private JComboBox jComboBox2;
	private JLabel jLabel9;
	private JTextField jTextField5;
	private JLabel jLabel7;
	private JLabel jLabel6;
	private JSeparator jSeparator1;
	private JTextField jTextField4;
	private JTextField jTextField2;
	private JLabel jLabel2;
	private JTextField jTextField1;
	private JTable jTable6;
	private JLabel jLabel1;
	private JPanel jPanel5;
	private JPanel jPanel4;
	private JPanel jPanel3;
	private JPanel jPanel2;

	private DefaultTableModel jTable1Model;
	private DefaultTableModel jTable2Model;
	private DefaultTableModel jTable3Model;
	private DefaultTableModel jTable4Model;
	private DefaultTableModel jTable5Model;
	private DefaultTableModel jTable6Model;
	
	int region2_1,region2_2,region4_1,region4_2;
	int selectrow1,selectrow2;
	
	private SearchController sc = new SC();
	private PromotionManager pm = new PM();
	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				Bargain inst = new Bargain();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public Bargain() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			this.setUndecorated(true);
			{
				jTabbedPane1 = new JTabbedPane();
				getContentPane().add(jTabbedPane1);
				jTabbedPane1.setBounds(31, 10, 1287, 736);
				jTabbedPane1.setFont(new java.awt.Font("微软雅黑",0,28));
				{
					jPanel1 = new JPanel();
					jTabbedPane1.addTab("商品特价促销", null, jPanel1, null);
					jPanel1.setLayout(null);
					jPanel1.setPreferredSize(new java.awt.Dimension(1190, 526));
					{
						jLabel1 = new JLabel();
						jPanel1.add(jLabel1);
						jLabel1.setText("\u8bf7\u8f93\u5165\u5546\u54c1\u6807\u8bc6");
						jLabel1.setBounds(46, 29, 253, 31);
						jLabel1.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField1 = new JTextField();
						jPanel1.add(jTextField1);
						jTextField1.setBounds(263, 29, 249, 37);
						jTextField1.setFont(new java.awt.Font("微软雅黑",0,28));
						jTextField1.addKeyListener(new KeyAdapter() {
							public void keyPressed(KeyEvent evt) {
								jTextField1KeyPressed(evt);
							}
						});
					}
					{
						jLabel2 = new JLabel();
						jPanel1.add(jLabel2);
						jLabel2.setText("\u540d\u79f0");
						jLabel2.setBounds(48, 87, 81, 30);
						jLabel2.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField2 = new JTextField();
						jPanel1.add(jTextField2);
						jTextField2.setBounds(120, 87, 195, 36);
						jTextField2.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel4 = new JLabel();
						jPanel1.add(jLabel4);
						jLabel4.setText("\u4ef7\u683c/\u5143");
						jLabel4.setBounds(367, 89, 121, 34);
						jLabel4.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField4 = new JTextField();
						jPanel1.add(jTextField4);
						jTextField4.setBounds(480, 86, 235, 38);
						jTextField4.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jSeparator1 = new JSeparator();
						jPanel1.add(jSeparator1);
						jSeparator1.setBounds(27, 140, 1237, 10);
					}
					{
						jLabel6 = new JLabel();
						jPanel1.add(jLabel6);
						jLabel6.setText("\u8bf7\u8f93\u5165\u7279\u4ef7\u4fe1\u606f");
						jLabel6.setBounds(49, 160, 240, 33);
						jLabel6.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel7 = new JLabel();
						jPanel1.add(jLabel7);
						jLabel7.setText("\u6298\u6263");
						jLabel7.setBounds(370, 161, 106, 31);
						jLabel7.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField5 = new JTextField();
						jPanel1.add(jTextField5);
						jTextField5.setBounds(480, 160, 234, 38);
						jTextField5.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel9 = new JLabel();
						jPanel1.add(jLabel9);
						jLabel9.setText("\u6709\u6548\u65e5\u671f\u4ece");
						jLabel9.setBounds(49, 216, 154, 30);
						jLabel9.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField6 = new JTextField();
						jPanel1.add(jTextField6);
						jTextField6.setBounds(198, 211, 167, 41);
						jTextField6.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel10 = new JLabel();
						jPanel1.add(jLabel10);
						jLabel10.setText("\u5e74");
						jLabel10.setBounds(375, 218, 38, 27);
						jLabel10.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox1Model = 
							new DefaultComboBoxModel(
									new String[] { "1", "2","3","4","5","6","7","8","9","10","11","12" });
						jComboBox1 = new JComboBox();
						jPanel1.add(jComboBox1);
						jComboBox1.setModel(jComboBox1Model);
						jComboBox1.setBounds(423, 213, 83, 35);
						jComboBox1.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel11 = new JLabel();
						jPanel1.add(jLabel11);
						jLabel11.setText("\u6708");
						jLabel11.setBounds(510, 213, 50, 34);
						jLabel11.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox2Model = 
							new DefaultComboBoxModel(
									new String[] { "1","2","3","4","5","6","7","8","9","10","11","12",
											"13","14","15","16","17","18","19","20","21","22","23","24","25",
											"26","27","28","29","30","31"});
						jComboBox2 = new JComboBox();
						jPanel1.add(jComboBox2);
						jComboBox2.setModel(jComboBox2Model);
						jComboBox2.setBounds(548, 211, 72, 38);
						jComboBox2.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel12 = new JLabel();
						jPanel1.add(jLabel12);
						jLabel12.setText("\u65e5 --");
						jLabel12.setBounds(624, 211, 81, 38);
						jLabel12.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField7 = new JTextField();
						jPanel1.add(jTextField7);
						jTextField7.setBounds(688, 212, 161, 39);
						jTextField7.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel13 = new JLabel();
						jPanel1.add(jLabel13);
						jLabel13.setText("\u5e74");
						jLabel13.setBounds(859, 215, 43, 26);
						jLabel13.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox3Model = 
							new DefaultComboBoxModel(
									new String[] { "1", "2","3","4","5","6","7","8","9","10","11","12" });
						jComboBox3 = new JComboBox();
						jPanel1.add(jComboBox3);
						jComboBox3.setModel(jComboBox3Model);
						jComboBox3.setBounds(893, 211, 94, 37);
						jComboBox3.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel14 = new JLabel();
						jPanel1.add(jLabel14);
						jLabel14.setText("\u6708");
						jLabel14.setBounds(991, 213, 44, 32);
						jLabel14.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox4Model = 
							new DefaultComboBoxModel(
									new String[] { "1","2","3","4","5","6","7","8","9","10","11","12",
											"13","14","15","16","17","18","19","20","21","22","23","24","25",
											"26","27","28","29","30","31"});
						jComboBox4 = new JComboBox();
						jPanel1.add(jComboBox4);
						jComboBox4.setModel(jComboBox4Model);
						jComboBox4.setBounds(1027, 212, 78, 34);
						jComboBox4.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel15 = new JLabel();
						jPanel1.add(jLabel15);
						jLabel15.setText("\u65e5");
						jLabel15.setBounds(1115, 215, 33, 28);
						jLabel15.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jButton1 = new JButton();
						jPanel1.add(jButton1);
						jButton1.setText("\u6dfb\u52a0");
						jButton1.setBounds(268, 258, 170, 46);
						jButton1.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton1.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton1ActionPerformed(evt);
							}
						});
					}
					{
						jButton2 = new JButton();
						jPanel1.add(jButton2);
						jButton2.setText("\u64a4\u6d88");
						jButton2.setBounds(788, 258, 151, 47);
						jButton2.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton2.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton2ActionPerformed(evt);
							}
						});
					}
					{
						jSeparator2 = new JSeparator();
						jPanel1.add(jSeparator2);
						jSeparator2.setBounds(30, 324, 1234, 10);
					}
					{
						jTable1Model = 
							new DefaultTableModel(
									new String[][]{ },
									new String[] {  "策略编号","商品编号","商品名称","价格/元","折扣","开始日期","结束日期" });
						jTable1 = new JTable(jTable1Model);
						//getContentPane().add(jTable1return, new AnchorConstraint(250, 886, 733, 42, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL));
						//jTable1.setModel(jTable1Model);
						jTable1.setBounds(24, 105, 632, 204);
						jTable1.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
						jTable1.setSelectionBackground(Color.BLACK);
						jTable1.setSelectionForeground(Color.WHITE);
						jTable1.getTableHeader().setFont(new java.awt.Font("微软雅黑",0,28));
						jTable1.setFont(new java.awt.Font("微软雅黑",0,28));
						jTable1.setRowHeight(30);
						JScrollPane scrollpane1 = new JScrollPane(jTable1);
						//getContentPane().add(scrollpane1return);
						scrollpane1.setBounds(30, 350, 1221, 213);
						jPanel1.add(scrollpane1);
					}
					{
						jButton3 = new JButton();
						jPanel1.add(jButton3);
						jButton3.setText("\u4fdd\u5b58");
						jButton3.setBounds(798, 600, 162, 64);
						jButton3.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton3.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton3ActionPerformed(evt);
							}
						});
					}
					{
						jButton4 = new JButton();
						jPanel1.add(jButton4);
						jButton4.setText("\u8fd4\u56de");
						jButton4.setBounds(1037, 605, 174, 59);
						jButton4.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton4.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton4ActionPerformed(evt);
							}
						});
					}
				}
				{
					jPanel2 = new JPanel();
					jTabbedPane1.addTab("总额特价促销", null, jPanel2, null);
					jPanel2.setLayout(null);
					jPanel2.setPreferredSize(new java.awt.Dimension(646, 374));
					{
						jLabel16 = new JLabel();
						jPanel2.add(jLabel16);
						jLabel16.setText("\u8bf7\u8f93\u5165\u603b\u989d\u7279\u4ef7\u4fe1\u606f");
						jLabel16.setBounds(36, 55, 274, 44);
						jLabel16.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel17 = new JLabel();
						jPanel2.add(jLabel17);
						jLabel17.setText("\u9884\u671f\u989d\u5ea6\u533a\u95f4\u4e2d\u503c/\u5143");
						jLabel17.setBounds(465, 57, 311, 42);
						jLabel17.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField8 = new JTextField();
						jPanel2.add(jTextField8);
						jTextField8.setBounds(748, 57, 203, 37);
						jTextField8.setFont(new java.awt.Font("微软雅黑",0,28));
						jTextField8.addKeyListener(new KeyAdapter() {
							public void keyPressed(KeyEvent evt) {
								jTextField8KeyPressed(evt);
							}
						});
					}
					{
						jLabel18 = new JLabel();
						jPanel2.add(jLabel18);
						jLabel18.setText("\u6298\u6263");
						jLabel18.setBounds(603, 137, 75, 33);
						jLabel18.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField9 = new JTextField();
						jPanel2.add(jTextField9);
						jTextField9.setBounds(672, 135, 138, 38);
						jTextField9.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel20 = new JLabel();
						jPanel2.add(jLabel20);
						jLabel20.setText("\u6709\u6548\u65e5\u671f\u81ea");
						jLabel20.setBounds(51, 216, 161, 29);
						jLabel20.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField10 = new JTextField();
						jPanel2.add(jTextField10);
						jTextField10.setBounds(205, 216, 120, 34);
						jTextField10.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel21 = new JLabel();
						jPanel2.add(jLabel21);
						jLabel21.setText("\u5e74");
						jLabel21.setBounds(335, 217, 34, 26);
						jLabel21.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox5Model = 
							new DefaultComboBoxModel(
									new String[] { "1", "2","3","4","5","6","7","8","9","10","11","12" });
						jComboBox5 = new JComboBox();
						jPanel2.add(jComboBox5);
						jComboBox5.setModel(jComboBox5Model);
						jComboBox5.setBounds(373, 213, 95, 37);
						jComboBox5.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel22 = new JLabel();
						jPanel2.add(jLabel22);
						jLabel22.setText("\u6708");
						jLabel22.setBounds(472, 218, 49, 26);
						jLabel22.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox6Model = 
							new DefaultComboBoxModel(
									new String[] { "1","2","3","4","5","6","7","8","9","10","11","12",
											"13","14","15","16","17","18","19","20","21","22","23","24","25",
											"26","27","28","29","30","31"});
						jComboBox6 = new JComboBox();
						jPanel2.add(jComboBox6);
						jComboBox6.setModel(jComboBox6Model);
						jComboBox6.setBounds(501, 214, 102, 35);
						jComboBox6.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel23 = new JLabel();
						jPanel2.add(jLabel23);
						jLabel23.setText("\u65e5 --");
						jLabel23.setBounds(613, 216, 77, 30);
						jLabel23.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField11 = new JTextField();
						jPanel2.add(jTextField11);
						jTextField11.setBounds(685, 217, 121, 30);
						jTextField11.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel24 = new JLabel();
						jPanel2.add(jLabel24);
						jLabel24.setText("\u5e74");
						jLabel24.setBounds(816, 216, 43, 30);
						jLabel24.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox7Model = 
							new DefaultComboBoxModel(
									new String[] { "1", "2","3","4","5","6","7","8","9","10","11","12" });
						jComboBox7 = new JComboBox();
						jPanel2.add(jComboBox7);
						jComboBox7.setModel(jComboBox7Model);
						jComboBox7.setBounds(854, 216, 93, 31);
						jComboBox7.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel25 = new JLabel();
						jPanel2.add(jLabel25);
						jLabel25.setText("\u6708");
						jLabel25.setBounds(957, 217, 40, 28);
						jLabel25.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox8Model = 
							new DefaultComboBoxModel(
									new String[] { "1","2","3","4","5","6","7","8","9","10","11","12",
											"13","14","15","16","17","18","19","20","21","22","23","24","25",
											"26","27","28","29","30","31"});
						jComboBox8 = new JComboBox();
						jPanel2.add(jComboBox8);
						jComboBox8.setModel(jComboBox8Model);
						jComboBox8.setBounds(997, 215, 100, 32);
						jComboBox8.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel26 = new JLabel();
						jPanel2.add(jLabel26);
						jLabel26.setText("\u65e5");
						jLabel26.setBounds(1107, 217, 36, 28);
						jLabel26.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTable2Model = 
							new DefaultTableModel(
									new String[][]{ },
									new String[] {  "策略编号","额度区间","折扣","开始日期","结束日期" });
						jTable2 = new JTable(jTable2Model);
						//getContentPane().add(jTable1return, new AnchorConstraint(250, 886, 733, 42, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL));
						//jTable1.setModel(jTable1Model);
						jTable2.setBounds(24, 105, 632, 204);
						jTable2.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
						jTable2.setSelectionBackground(Color.BLACK);
						jTable2.setSelectionForeground(Color.WHITE);
						jTable2.getTableHeader().setFont(new java.awt.Font("微软雅黑",0,28));
						jTable2.setFont(new java.awt.Font("微软雅黑",0,28));
						jTable2.setRowHeight(30);
						JScrollPane scrollpane2 = new JScrollPane(jTable2);
						//getContentPane().add(scrollpane1return);
						scrollpane2.setBounds(27, 331, 1203, 219);
						jPanel2.add(scrollpane2);
					}
					{
						jButton5 = new JButton();
						jPanel2.add(jButton5);
						jButton5.setText("\u6dfb\u52a0");
						jButton5.setBounds(335, 268, 144, 48);
						jButton5.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton5.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton5ActionPerformed(evt);
							}
						});
					}
					{
						jButton6 = new JButton();
						jPanel2.add(jButton6);
						jButton6.setText("\u64a4\u6d88");
						jButton6.setBounds(730, 268, 141, 48);
						jButton6.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton6.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton6ActionPerformed(evt);
							}
						});
					}
					{
						jButton8 = new JButton();
						jPanel2.add(jButton8);
						jButton8.setText("\u4fdd\u5b58");
						jButton8.setBounds(730, 572, 180, 67);
						jButton8.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton8.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton8ActionPerformed(evt);
							}
						});
					}
					{
						jButton9 = new JButton();
						jPanel2.add(jButton9);
						jButton9.setText("\u8fd4\u56de");
						jButton9.setBounds(1004, 572, 202, 67);
						jButton9.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton9.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton9ActionPerformed(evt);
							}
						});
					}
					{
						jLabel3 = new JLabel();
						jPanel2.add(jLabel3);
						jLabel3.setText("\u989d\u5ea6\u533a\u95f4/\u5143");
						jLabel3.setBounds(51, 138, 161, 32);
						jLabel3.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField3 = new JTextField();
						jPanel2.add(jTextField3);
						jTextField3.setBounds(212, 138, 148, 35);
						jTextField3.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel5 = new JLabel();
						jPanel2.add(jLabel5);
						jLabel5.setText("--");
						jLabel5.setBounds(370, 139, 59, 24);
						jLabel5.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField12 = new JTextField();
						jPanel2.add(jTextField12);
						jTextField12.setBounds(407, 139, 146, 34);
						jTextField12.setFont(new java.awt.Font("微软雅黑",0,28));
					}
				}
				{
					jPanel5 = new JPanel();
					jTabbedPane1.addTab("移除促销策略", null, jPanel5, null);
					jPanel5.setLayout(null);
					jPanel5.setPreferredSize(new java.awt.Dimension(689, 366));
					{
						jTable5Model = 
							new DefaultTableModel(
									new String[][]{ },
									new String[] {  "策略编号","类型","额度","折扣","商品编号","礼品编号","开始日期","结束日期" });
						jTable5 = new JTable(jTable5Model);
						//getContentPane().add(jTable1return, new AnchorConstraint(250, 886, 733, 42, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL));
						//jTable1.setModel(jTable1Model);
						jTable5.setBounds(24, 105, 632, 204);
						jTable5.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
						jTable5.setSelectionBackground(Color.BLACK);
						jTable5.setSelectionForeground(Color.WHITE);
						jTable5.getTableHeader().setFont(new java.awt.Font("微软雅黑",0,28));
						jTable5.setFont(new java.awt.Font("微软雅黑",0,28));
						jTable5.setRowHeight(30);
						JScrollPane scrollpane5 = new JScrollPane(jTable5);
						//getContentPane().add(scrollpane1return);
						scrollpane5.setBounds(34, 86, 1230, 180);
						jPanel5.add(scrollpane5);
						jTable5.getSelectionModel().addListSelectionListener(new ListSelectionListener(){    
							public void valueChanged(ListSelectionEvent e)  
							{  
								selectrow1 = jTable5.getSelectedRow();  
								String[] selectrows = new String[8];
								for(int count=0;count<8;count++){
									selectrows[count] = jTable5.getValueAt(selectrow1,count).toString();
								}
								jTable6Model.addRow(selectrows);
							}  
						});  
					}
					{
						jTable6Model = 
							new DefaultTableModel(
									new String[][]{ },
									new String[] {  "策略编号","类型","额度","折扣","商品编号","礼品编号","开始日期","结束日期" });
						jTable6 = new JTable(jTable6Model);
						//getContentPane().add(jTable1return, new AnchorConstraint(250, 886, 733, 42, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL));
						//jTable1.setModel(jTable1Model);
						jTable6.setBounds(24, 105, 632, 204);
						jTable6.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
						jTable6.setSelectionBackground(Color.BLACK);
						jTable6.setSelectionForeground(Color.WHITE);
						jTable6.getTableHeader().setFont(new java.awt.Font("微软雅黑",0,28));
						jTable6.setFont(new java.awt.Font("微软雅黑",0,28));
						jTable6.setRowHeight(30);
						JScrollPane scrollpane6 = new JScrollPane(jTable6);
						//getContentPane().add(scrollpane1return);
						scrollpane6.setBounds(34, 333, 1230, 183);
						jPanel5.add(scrollpane6);
						jTable6.getSelectionModel().addListSelectionListener(new ListSelectionListener(){    
							public void valueChanged(ListSelectionEvent e)  
							{  
								selectrow2 = jTable6.getSelectedRow();  
								jTable6Model.removeRow(selectrow2);
							}  
						});  
					}
					{
						jLabel70 = new JLabel();
						jPanel5.add(jLabel70);
						jLabel70.setText("\u79fb\u9664\u7b56\u7565\u5217\u8868");
						jLabel70.setBounds(95, 276, 268, 62);
						jLabel70.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jButton18 = new JButton();
						jPanel5.add(jButton18);
						jButton18.setText("\u786e\u8ba4\u79fb\u9664");
						jButton18.setBounds(740, 552, 207, 67);
						jButton18.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton18.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton18ActionPerformed(evt);
							}
						});
					}
					{
						jButton19 = new JButton();
						jPanel5.add(jButton19);
						jButton19.setText("\u8fd4\u56de");
						jButton19.setBounds(1061, 552, 149, 67);
						jButton19.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton19.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton19ActionPerformed(evt);
							}
						});
					}
					{
						jLabel8 = new JLabel();
						jPanel5.add(jLabel8);
						jLabel8.setText("\u6240\u6709\u7b56\u7565\u5217\u8868");
						jLabel8.setBounds(95, 17, 268, 44);
						jLabel8.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jButton17 = new JButton();
						jPanel5.add(jButton17);
						jButton17.setText("\u663e\u793a\u6240\u6709\u7b56\u7565");
						jButton17.setBounds(112, 552, 227, 67);
						jButton17.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton17.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton17ActionPerformed(evt);
							}
						});
					}
				}
				{
					jPanel4 = new JPanel();
					jTabbedPane1.addTab("总额赠送促销", null, jPanel4, null);
					jPanel4.setLayout(null);
					{
						jLabel49 = new JLabel();
						jPanel4.add(jLabel49);
						jLabel49.setText("\u8bf7\u8f93\u5165\u603b\u989d\u5ea6");
						jLabel49.setBounds(35, 25, 186, 37);
						jLabel49.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField26 = new JTextField();
						jPanel4.add(jTextField26);
						jTextField26.setBounds(370, 84, 138, 33);
						jTextField26.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel51 = new JLabel();
						jPanel4.add(jLabel51);
						jLabel51.setText("\u989d\u5ea6\u533a\u95f4/\u5143");
						jLabel51.setBounds(35, 82, 154, 35);
						jLabel51.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField27 = new JTextField();
						jPanel4.add(jTextField27);
						jTextField27.setBounds(195, 85, 139, 32);
						jTextField27.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel52 = new JLabel();
						jPanel4.add(jLabel52);
						jLabel52.setText("--");
						jLabel52.setBounds(340, 83, 86, 37);
						jLabel52.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel53 = new JLabel();
						jPanel4.add(jLabel53);
						jLabel53.setText("\u9884\u671f\u989d\u5ea6\u533a\u95f4\u4e2d\u503c/\u5143");
						jLabel53.setBounds(325, 25, 284, 36);
						jLabel53.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField28 = new JTextField();
						jPanel4.add(jTextField28);
						jTextField28.setBounds(607, 25, 161, 36);
						jTextField28.setFont(new java.awt.Font("微软雅黑",0,28));
						jTextField28.addKeyListener(new KeyAdapter() {
							public void keyPressed(KeyEvent evt) {
								jTextField28KeyPressed(evt);
							}
						});
					}
					{
						jSeparator5 = new JSeparator();
						jPanel4.add(jSeparator5);
						jSeparator5.setBounds(23, 129, 1233, 10);
					}
					{
						jLabel54 = new JLabel();
						jPanel4.add(jLabel54);
						jLabel54.setText("\u8bf7\u8f93\u5165\u8d60\u54c1\u6807\u8bc6");
						jLabel54.setBounds(35, 143, 218, 40);
						jLabel54.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField29 = new JTextField();
						jPanel4.add(jTextField29);
						jTextField29.setBounds(251, 145, 170, 36);
						jTextField29.setFont(new java.awt.Font("微软雅黑",0,28));
						jTextField29.addKeyListener(new KeyAdapter() {
							public void keyPressed(KeyEvent evt) {
								jTextField29KeyPressed(evt);
							}
						});
					}
					{
						jLabel59 = new JLabel();
						jPanel4.add(jLabel59);
						jLabel59.setText("\u540d\u79f0");
						jLabel59.setBounds(29, 186, 116, 42);
						jLabel59.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField33 = new JTextField();
						jPanel4.add(jTextField33);
						jTextField33.setBounds(102, 189, 178, 37);
						jTextField33.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel61 = new JLabel();
						jPanel4.add(jLabel61);
						jLabel61.setText("\u6709\u6548\u65e5\u671f\u4ece");
						jLabel61.setBounds(29, 242, 162, 32);
						jLabel61.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel62 = new JLabel();
						jPanel4.add(jLabel62);
						jLabel62.setText("\u5e74");
						jLabel62.setBounds(292, 241, 38, 33);
						jLabel62.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField35 = new JTextField();
						jPanel4.add(jTextField35);
						jTextField35.setBounds(181, 244, 105, 33);
						jTextField35.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox13Model = 
							new DefaultComboBoxModel(
									new String[] { "1", "2","3","4","5","6","7","8","9","10","11","12" });
						jComboBox13 = new JComboBox();
						jPanel4.add(jComboBox13);
						jComboBox13.setModel(jComboBox13Model);
						jComboBox13.setBounds(334, 241, 81, 34);
						jComboBox13.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel63 = new JLabel();
						jPanel4.add(jLabel63);
						jLabel63.setText("\u6708");
						jLabel63.setBounds(421, 241, 45, 34);
						jLabel63.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox14Model = 
							new DefaultComboBoxModel(
									new String[] { "1","2","3","4","5","6","7","8","9","10","11","12",
											"13","14","15","16","17","18","19","20","21","22","23","24","25",
											"26","27","28","29","30","31"});
						jComboBox14 = new JComboBox();
						jPanel4.add(jComboBox14);
						jComboBox14.setModel(jComboBox14Model);
						jComboBox14.setBounds(454, 243, 90, 31);
						jComboBox14.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel64 = new JLabel();
						jPanel4.add(jLabel64);
						jLabel64.setText("\u65e5 --");
						jLabel64.setBounds(550, 243, 77, 31);
						jLabel64.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField36 = new JTextField();
						jPanel4.add(jTextField36);
						jTextField36.setBounds(621, 244, 121, 29);
						jTextField36.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel65 = new JLabel();
						jPanel4.add(jLabel65);
						jLabel65.setText("\u5e74");
						jLabel65.setBounds(748, 238, 53, 37);
						jLabel65.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox15Model = 
							new DefaultComboBoxModel(
									new String[] { "1", "2","3","4","5","6","7","8","9","10","11","12" });
						jComboBox15 = new JComboBox();
						jPanel4.add(jComboBox15);
						jComboBox15.setModel(jComboBox15Model);
						jComboBox15.setBounds(783, 240, 108, 34);
						jComboBox15.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel66 = new JLabel();
						jPanel4.add(jLabel66);
						jLabel66.setText("\u6708");
						jLabel66.setBounds(897, 241, 32, 30);
						jLabel66.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox16Model = 
							new DefaultComboBoxModel(
									new String[] { "1","2","3","4","5","6","7","8","9","10","11","12",
											"13","14","15","16","17","18","19","20","21","22","23","24","25",
											"26","27","28","29","30","31"});
						jComboBox16 = new JComboBox();
						jPanel4.add(jComboBox16);
						jComboBox16.setModel(jComboBox16Model);
						jComboBox16.setBounds(929, 239, 100, 35);
						jComboBox16.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel67 = new JLabel();
						jPanel4.add(jLabel67);
						jLabel67.setText("\u65e5");
						jLabel67.setBounds(1035, 241, 49, 31);
						jLabel67.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTable4Model = 
							new DefaultTableModel(
									new String[][]{ },
									new String[] {  "策略编号","额度区间","礼品编号","名称","开始日期","结束日期" });
						jTable4 = new JTable(jTable4Model);
						//getContentPane().add(jTable1return, new AnchorConstraint(250, 886, 733, 42, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL));
						//jTable1.setModel(jTable1Model);
						jTable4.setBounds(24, 105, 632, 204);
						jTable4.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
						jTable4.setSelectionBackground(Color.BLACK);
						jTable4.setSelectionForeground(Color.WHITE);
						jTable4.getTableHeader().setFont(new java.awt.Font("微软雅黑",0,28));
						jTable4.setFont(new java.awt.Font("微软雅黑",0,28));
						jTable4.setRowHeight(30);
						JScrollPane scrollpane4 = new JScrollPane(jTable4);
						//getContentPane().add(scrollpane1return);
						scrollpane4.setBounds(27, 355, 1229, 185);
						jPanel4.add(scrollpane4);
					}
					{
						jButton15 = new JButton();
						jPanel4.add(jButton15);
						jButton15.setText("\u4fdd\u5b58");
						jButton15.setBounds(710, 579, 154, 63);
						jButton15.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton15.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton15ActionPerformed(evt);
							}
						});
					}
					{
						jButton16 = new JButton();
						jPanel4.add(jButton16);
						jButton16.setText("\u8fd4\u56de");
						jButton16.setBounds(996, 577, 160, 66);
						jButton16.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton16.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton16ActionPerformed(evt);
							}
						});
					}
					{
						jButton11 = new JButton();
						jPanel4.add(jButton11);
						jButton11.setText("\u6dfb\u52a0");
						jButton11.setBounds(255, 275, 160, 54);
						jButton11.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton11.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton11ActionPerformed(evt);
							}
						});
					}
					{
						jButton14 = new JButton();
						jPanel4.add(jButton14);
						jButton14.setText("\u64a4\u6d88");
						jButton14.setBounds(703, 271, 161, 54);
						jButton14.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton14.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton14ActionPerformed(evt);
							}
						});
					}
					{
						jSeparator6 = new JSeparator();
						jPanel4.add(jSeparator6);
						jSeparator6.setBounds(23, 333, 1229, 10);
					}
				}
				{
					jPanel3 = new JPanel();
					jTabbedPane1.addTab("商品赠送促销", null, jPanel3, null);
					jPanel3.setLayout(null);
					jPanel3.setPreferredSize(new java.awt.Dimension(627, 398));
					
					{
						jLabel30 = new JLabel();
						jPanel3.add(jLabel30);
						jLabel30.setText("\u8bf7\u8f93\u5165\u5546\u54c1\u6807\u8bc6");
						jLabel30.setBounds(44, 45, 225, 39);
						jLabel30.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField13 = new JTextField();
						jPanel3.add(jTextField13);
						jTextField13.setBounds(254, 44, 194, 40);
						jTextField13.setFont(new java.awt.Font("微软雅黑",0,28));
						jTextField13.addKeyListener(new KeyAdapter() {
							public void keyPressed(KeyEvent evt) {
								jTextField13KeyPressed(evt);
							}
						});
					}
					{
						jLabel31 = new JLabel();
						jPanel3.add(jLabel31);
						jLabel31.setText("\u540d\u79f0");
						jLabel31.setBounds(44, 114, 91, 36);
						jLabel31.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField14 = new JTextField();
						jPanel3.add(jTextField14);
						jTextField14.setBounds(108, 114, 227, 36);
						jTextField14.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel32 = new JLabel();
						jPanel3.add(jLabel32);
						jLabel32.setText("\u4ef7\u683c/\u5143");
						jLabel32.setBounds(398, 109, 101, 33);
						jLabel32.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField15 = new JTextField();
						jPanel3.add(jTextField15);
						jTextField15.setBounds(509, 108, 183, 34);
						jTextField15.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel35 = new JLabel();
						jPanel3.add(jLabel35);
						jLabel35.setText("\u8bf7\u8f93\u5165\u8d60\u54c1\u6807\u8bc6");
						jLabel35.setBounds(44, 175, 203, 32);
						jLabel35.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField17 = new JTextField();
						jPanel3.add(jTextField17);
						jTextField17.setBounds(251, 175, 178, 35);
						jTextField17.setFont(new java.awt.Font("微软雅黑",0,28));
						jTextField17.addKeyListener(new KeyAdapter() {
							public void keyPressed(KeyEvent evt) {
								jTextField17KeyPressed(evt);
							}
						});
					}
					{
						jLabel36 = new JLabel();
						jPanel3.add(jLabel36);
						jLabel36.setText("\u540d\u79f0");
						jLabel36.setBounds(42, 224, 82, 40);
						jLabel36.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField18 = new JTextField();
						jPanel3.add(jTextField18);
						jTextField18.setBounds(116, 229, 163, 30);
						jTextField18.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel41 = new JLabel();
						jPanel3.add(jLabel41);
						jLabel41.setText("\u6709\u6548\u65e5\u671f\u81ea");
						jLabel41.setBounds(41, 276, 155, 31);
						jLabel41.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField22 = new JTextField();
						jPanel3.add(jTextField22);
						jTextField22.setBounds(191, 272, 138, 37);
						jTextField22.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel42 = new JLabel();
						jPanel3.add(jLabel42);
						jLabel42.setText("\u5e74");
						jLabel42.setBounds(329, 268, 47, 48);
						jLabel42.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox9Model = 
							new DefaultComboBoxModel(
									new String[] { "1", "2","3","4","5","6","7","8","9","10","11","12" });
						jComboBox9 = new JComboBox();
						jPanel3.add(jComboBox9);
						jComboBox9.setModel(jComboBox9Model);
						jComboBox9.setBounds(364, 277, 88, 36);
						jComboBox9.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel43 = new JLabel();
						jPanel3.add(jLabel43);
						jLabel43.setText("\u6708");
						jLabel43.setBounds(456, 270, 43, 44);
						jLabel43.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox10Model = 
							new DefaultComboBoxModel(
									new String[] { "1","2","3","4","5","6","7","8","9","10","11","12",
											"13","14","15","16","17","18","19","20","21","22","23","24","25",
											"26","27","28","29","30","31"});
						jComboBox10 = new JComboBox();
						jPanel3.add(jComboBox10);
						jComboBox10.setModel(jComboBox10Model);
						jComboBox10.setBounds(482, 276, 97, 36);
						jComboBox10.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel44 = new JLabel();
						jPanel3.add(jLabel44);
						jLabel44.setText("\u65e5 --");
						jLabel44.setBounds(583, 274, 93, 41);
						jLabel44.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField23 = new JTextField();
						jPanel3.add(jTextField23);
						jTextField23.setBounds(646, 277, 114, 36);
						jTextField23.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel45 = new JLabel();
						jPanel3.add(jLabel45);
						jLabel45.setText("\u5e74");
						jLabel45.setBounds(770, 274, 56, 40);
						jLabel45.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox11Model = 
							new DefaultComboBoxModel(
									new String[] { "1", "2","3","4","5","6","7","8","9","10","11","12" });
						jComboBox11 = new JComboBox();
						jPanel3.add(jComboBox11);
						jComboBox11.setModel(jComboBox11Model);
						jComboBox11.setBounds(801, 276, 94, 36);
						jComboBox11.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel46 = new JLabel();
						jPanel3.add(jLabel46);
						jLabel46.setText("\u6708");
						jLabel46.setBounds(899, 272, 48, 44);
						jLabel46.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox12Model = 
							new DefaultComboBoxModel(
									new String[] { "1","2","3","4","5","6","7","8","9","10","11","12",
											"13","14","15","16","17","18","19","20","21","22","23","24","25",
											"26","27","28","29","30","31"});
						jComboBox12 = new JComboBox();
						jPanel3.add(jComboBox12);
						jComboBox12.setModel(jComboBox12Model);
						jComboBox12.setBounds(930, 277, 102, 35);
						jComboBox12.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel47 = new JLabel();
						jPanel3.add(jLabel47);
						jLabel47.setText("\u65e5");
						jLabel47.setBounds(1036, 272, 47, 44);
						jLabel47.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jButton10 = new JButton();
						jPanel3.add(jButton10);
						jButton10.setText("\u6dfb\u52a0");
						jButton10.setBounds(269, 316, 158, 48);
						jButton10.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton10.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton10ActionPerformed(evt);
							}
						});
					}
					{
						jTable3Model = 
							new DefaultTableModel(
									new String[][]{ },
									new String[] {  "策略编号","商品编号","名称","价格","礼品编号","名称","开始日期","结束日期" });
						jTable3 = new JTable(jTable3Model);
						//getContentPane().add(jTable1return, new AnchorConstraint(250, 886, 733, 42, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL));
						//jTable1.setModel(jTable1Model);
						jTable3.setBounds(24, 105, 632, 204);
						jTable3.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
						jTable3.setSelectionBackground(Color.BLACK);
						jTable3.setSelectionForeground(Color.WHITE);
						jTable3.getTableHeader().setFont(new java.awt.Font("微软雅黑",0,28));
						jTable3.setFont(new java.awt.Font("微软雅黑",0,28));
						jTable3.setRowHeight(30);
						JScrollPane scrollpane3 = new JScrollPane(jTable3);
						//getContentPane().add(scrollpane1return);
						scrollpane3.setBounds(34, 381, 1228, 201);
						jPanel3.add(scrollpane3);
					}
					{
						jButton12 = new JButton();
						jPanel3.add(jButton12);
						jButton12.setText("\u4fdd\u5b58");
						jButton12.setBounds(770, 604, 156, 49);
						jButton12.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton12.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton12ActionPerformed(evt);
							}
						});
					}
					{
						jButton13 = new JButton();
						jPanel3.add(jButton13);
						jButton13.setText("\u8fd4\u56de");
						jButton13.setBounds(1042, 599, 161, 54);
						jButton13.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton13.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton13ActionPerformed(evt);
							}
						});
					}
					{
						jButton7 = new JButton();
						jPanel3.add(jButton7);
						jButton7.setText("\u64a4\u6d88");
						jButton7.setBounds(761, 316, 128, 48);
						jButton7.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton7.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton7ActionPerformed(evt);
							}
						});
					}
				}
			}
			pack();
			this.setSize(1333, 792);
			getGraphicsConfiguration().getDevice().setFullScreenWindow(this);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	private void jTextField1KeyPressed(KeyEvent evt) {
		//System.out.println("jTextField1.keyPressed, event="+evt);
		if(evt.getKeyCode()==KeyEvent.VK_ENTER){
		String goodsid1 = jTextField1.getText();
		if(goodsid1.equals(null)||goodsid1.equals("")){
			JOptionPane.showMessageDialog(this,"商品编号不能为空！ ");
			return;
		}
		String[] goodsinfo1 = sc.getGoods(goodsid1);
		if(goodsinfo1.equals(null)){
			JOptionPane.showMessageDialog(this,"查无此商品！ ");
			return;
		}
		jTextField2.setText(goodsinfo1[1]);
		jTextField4.setText(goodsinfo1[2]);}
	}//商品特价促销-商品编号监听
	
	private void jButton1ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton1.actionPerformed, event="+evt);
		String discount1 = jTextField5.getText();
		String syear1 = jTextField6.getText();
		String smonth1 = jComboBox1.getSelectedItem().toString();
		String sday1 = jComboBox2.getSelectedItem().toString();
		String eyear1 = jTextField7.getText();
		String emonth1 = jComboBox13.getSelectedItem().toString();
		String eday1 = jComboBox4.getSelectedItem().toString();
		String sdate1 = syear1+"/"+smonth1+"/"+sday1;
		String edate1 = eyear1+"/"+emonth1+"/"+eday1;
		if(discount1.equals("")||Integer.parseInt(syear1)>Integer.parseInt(eyear1)){
			JOptionPane.showMessageDialog(this,"策略信息有误！ ");
			return;
		}
		String tacticid1 = pm.getPromotionID(0);
		String[] tactic1 = new String[]{tacticid1, jTextField1.getText(),jTextField2.getText(),
				jTextField4.getText(),discount1,sdate1,edate1};
		jTable1Model.addRow(tactic1);
		
	}//商品特价促销-添加按钮
	
	private void jButton2ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton2.actionPerformed, event="+evt);
		int rowcount1 = jTable1.getRowCount();
		if(rowcount1==0){
			JOptionPane.showMessageDialog(this,"无法删除！ ");
			return;
		}
		jTable1Model.removeRow(rowcount1-1);
	}//商品特价促销-撤消按钮
	
	private void jButton3ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton3.actionPerformed, event="+evt);
		int rownum1 = jTable1.getRowCount();
		String[][] gdp1 = new String[rownum1][5];
		for(int i=0;i<rownum1;i++){
				gdp1[i][0]=jTable1.getValueAt(i, 0).toString();
				gdp1[i][1]=jTable1.getValueAt(i, 1).toString();
				gdp1[i][2]=jTable1.getValueAt(i, 4).toString();
				gdp1[i][3]=jTable1.getValueAt(i, 5).toString();
				gdp1[i][4]=jTable1.getValueAt(i, 6).toString();
			}
		Boolean result1 = pm.storeGDP(gdp1);
		if(result1){
			JOptionPane.showMessageDialog(this,"保存成功！ ");
			return;
		}
		else{
			JOptionPane.showMessageDialog(this,"保存失败！ ");
			return;
		}
	}//商品特价促销-保存按钮
	
	private void jTextField8KeyPressed(KeyEvent evt) {
		//System.out.println("jTextField8.keyPressed, event="+evt);
		if(evt.getKeyCode()==KeyEvent.VK_ENTER){
			String midvalue2 = jTextField8.getText();
			if(midvalue2.equals("")){
				JOptionPane.showMessageDialog(this,"预计值为空！ ");
				return;
			}
			region2_1 = pm.getRegion(midvalue2, 1)[0];	
		    region2_2 = pm.getRegion(midvalue2, 1)[1];	
			if(true){
				JOptionPane.showMessageDialog(this,"额度许可空间为 "+region2_1+"~"+region2_2);
				return;
			}
			jTextField3.setText(region2_1+"");
			jTextField12.setText(region2_2+"");
		}
	}//总额特价-中值监听
	
	private void jButton5ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton5.actionPerformed, event="+evt);
		if(Integer.parseInt(jTextField3.getText())<region2_1||Integer.parseInt(jTextField12.getText())<region2_2){
			JOptionPane.showMessageDialog(this,"额度区间超过限制！");
			return;
		}
		String section2 = jTextField3.getText()+"~"+jTextField12.getText();
		String discount2 = jTextField9.getText();
		String syear2 = jTextField10.getText();
		String smonth2 = jComboBox5.getSelectedItem().toString();
		String sday2 = jComboBox6.getSelectedItem().toString();
		String eyear2 = jTextField11.getText();
		String emonth2 = jComboBox7.getSelectedItem().toString();
		String eday2 = jComboBox8.getSelectedItem().toString();
		String sdate2 = syear2+"/"+smonth2+"/"+sday2;
		String edate2 = eyear2+"/"+emonth2+"/"+eday2;
		if(discount2.equals("")||Integer.parseInt(syear2)>Integer.parseInt(eyear2)){
			JOptionPane.showMessageDialog(this,"策略信息有误！ ");
			return;
		}
		String tacticid2 = pm.getPromotionID(1);
		String[] tactic2 = new String[]{tacticid2, section2,discount2,sdate2,edate2};
		jTable2Model.addRow(tactic2);
	}//总额特价-添加
	
	private void jButton6ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton6.actionPerformed, event="+evt);
		int rowcount2 = jTable2.getRowCount();
		if(rowcount2==0){
			JOptionPane.showMessageDialog(this,"无法删除！ ");
			return;
		}
		jTable2Model.removeRow(rowcount2-1);
	}//总额特价-撤消
	
	private void jButton8ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton8.actionPerformed, event="+evt);
		int rownum2 = jTable2.getRowCount();
		String[][] tdp2 = new String[rownum2][5];
		for(int i=0;i<rownum2;i++){
				tdp2[i][0]=jTable2.getValueAt(i, 0).toString();
				tdp2[i][1]=jTable2.getValueAt(i, 1).toString();
				tdp2[i][2]=jTable2.getValueAt(i, 2).toString();
				tdp2[i][3]=jTable2.getValueAt(i, 3).toString();
				tdp2[i][4]=jTable2.getValueAt(i, 4).toString();
			}
		Boolean result2 = pm.storeTDP(tdp2);
		if(result2){
			JOptionPane.showMessageDialog(this,"保存成功！ ");
			return;
		}
		else{
			JOptionPane.showMessageDialog(this,"保存失败！ ");
			return;
		}
	}//总额特价-保存
	
	private void jTextField13KeyPressed(KeyEvent evt) {
		//System.out.println("jTextField13.keyPressed, event="+evt);
		if(evt.getKeyCode()==KeyEvent.VK_ENTER){
			String goodsid3 = jTextField13.getText();
			if(goodsid3.equals(null)||goodsid3.equals("")){
				JOptionPane.showMessageDialog(this,"商品编号不能为空！ ");
				return;
			}
			String[] goodsinfo3 = sc.getGoods(goodsid3);
			if(goodsinfo3.equals(null)){
				JOptionPane.showMessageDialog(this,"查无此商品！ ");
				return;
			}
			jTextField14.setText(goodsinfo3[1]);
			jTextField15.setText(goodsinfo3[2]);}
	}//商品赠送-商品查询
	
	private void jTextField17KeyPressed(KeyEvent evt) {
		//System.out.println("jTextField17.keyPressed, event="+evt);
		if(evt.getKeyCode()==KeyEvent.VK_ENTER){
			String giftid3 = jTextField17.getText();
			if(giftid3.equals(null)||giftid3.equals("")){
				JOptionPane.showMessageDialog(this,"礼品编号不能为空！ ");
				return;
			}
			String[] giftinfo3 = sc.getGift(giftid3);
			if(giftinfo3.equals(null)){
				JOptionPane.showMessageDialog(this,"查无此商品！ ");
				return;
			}
			jTextField18.setText(giftinfo3[1]);
			//jTextField19.setText(giftinfo3[2]);
			}
	}//商品赠送-礼品查询
	
	private void jButton10ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton10.actionPerformed, event="+evt);
		String gdid3 = jTextField13.getText();
		String gdname3 = jTextField14.getText();
		String gdprice3 = jTextField15.getText();
		String gfid3 = jTextField17.getText();
		String gfname3 = jTextField18.getText();
		//String gfprice3 = jTextField19.getText();
		String syear3 = jTextField6.getText();
		String smonth3 = jComboBox1.getSelectedItem().toString();
		String sday3 = jComboBox2.getSelectedItem().toString();
		String eyear3 = jTextField7.getText();
		String emonth3 = jComboBox13.getSelectedItem().toString();
		String eday3 = jComboBox4.getSelectedItem().toString();
		String sdate3 = syear3+"/"+smonth3+"/"+sday3;
		String edate3 = eyear3+"/"+emonth3+"/"+eday3;
		if(gdid3.equals("")||gfid3.equals("")||Integer.parseInt(syear3)>Integer.parseInt(eyear3)){
			JOptionPane.showMessageDialog(this,"策略信息有误！ ");
			return;
		}
		String tacticid3 = pm.getPromotionID(2);
		String[] tactic3 = new String[]{tacticid3, gdid3,gdname3,
				gdprice3,gfid3,gfname3,sdate3,edate3};
		jTable3Model.addRow(tactic3);
	}//商品赠送-添加
	
	private void jButton7ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton7.actionPerformed, event="+evt);
		int rowcount3 = jTable3.getRowCount();
		if(rowcount3==0){
			JOptionPane.showMessageDialog(this,"无法删除！ ");
			return;
		}
		jTable3Model.removeRow(rowcount3-1);
	}//商品赠送-撤消
	
	private void jButton12ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton12.actionPerformed, event="+evt);
		int rownum3 = jTable3.getRowCount();
		String[][] ggp3 = new String[rownum3][5];
		for(int i=0;i<rownum3;i++){
			ggp3[i][0]=jTable3.getValueAt(i, 0).toString();
			ggp3[i][1]=jTable3.getValueAt(i, 1).toString();
			ggp3[i][2]=jTable3.getValueAt(i, 4).toString();
			ggp3[i][3]=jTable3.getValueAt(i, 6).toString();
			ggp3[i][4]=jTable3.getValueAt(i, 7).toString();
			}
		Boolean result3 = pm.storeGGP(ggp3);
		if(result3){
			JOptionPane.showMessageDialog(this,"保存成功！ ");
			return;
		}
		else{
			JOptionPane.showMessageDialog(this,"保存失败！ ");
			return;
		}
	}//商品赠送-保存
	
	private void jTextField28KeyPressed(KeyEvent evt) {
		//System.out.println("jTextField28.keyPressed, event="+evt);
		if(evt.getKeyCode()==KeyEvent.VK_ENTER){
			String midvalue4 = jTextField28.getText();
			if(midvalue4.equals("")){
				JOptionPane.showMessageDialog(this,"预计值为空！ ");
				return;
			}
			region4_1 = pm.getRegion(midvalue4, 3)[0];	
		    region4_2 = pm.getRegion(midvalue4, 3)[1];	
			if(true){
				JOptionPane.showMessageDialog(this,"额度许可空间为 "+region4_1+"~"+region4_2);
				return;
			}
			jTextField27.setText(region4_1+"");
			jTextField26.setText(region4_2+"");
		}
	}//总额赠送-中值
	
	private void jTextField29KeyPressed(KeyEvent evt) {
		//System.out.println("jTextField29.keyPressed, event="+evt);
		if(evt.getKeyCode()==KeyEvent.VK_ENTER){
			String giftid4 = jTextField29.getText();
			if(giftid4.equals(null)||giftid4.equals("")){
				JOptionPane.showMessageDialog(this,"礼品编号不能为空！ ");
				return;
			}
			String[] giftinfo4 = sc.getGift(giftid4);
			if(giftinfo4.equals(null)){
				JOptionPane.showMessageDialog(this,"查无此商品！ ");
				return;
			}
			jTextField33.setText(giftinfo4[1]);
			
			}
	}//总额赠送-礼品查询
	
	private void jButton11ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton11.actionPerformed, event="+evt);
		if(Integer.parseInt(jTextField27.getText())<region4_1||Integer.parseInt(jTextField26.getText())>region4_2){
			JOptionPane.showMessageDialog(this,"额度区间超过限制！");
			return;
		}
		String section4 = jTextField27.getText()+"~"+jTextField26.getText();
		
		String gfid4 = jTextField29.getText();
		String gfname4 = jTextField33.getText();
		//String gfprice4 = jTextField34.getText();
		String syear4 = jTextField35.getText();
		String smonth4 = jComboBox13.getSelectedItem().toString();
		String sday4 = jComboBox14.getSelectedItem().toString();
		String eyear4 = jTextField36.getText();
		String emonth4 = jComboBox15.getSelectedItem().toString();
		String eday4 = jComboBox16.getSelectedItem().toString();
		String sdate4 = syear4+"/"+smonth4+"/"+sday4;
		String edate4 = eyear4+"/"+emonth4+"/"+eday4;
		if(gfid4.equals("")||Integer.parseInt(syear4)>Integer.parseInt(eyear4)){
			JOptionPane.showMessageDialog(this,"策略信息有误！ ");
			return;
		}
		String tacticid4 = pm.getPromotionID(3);
		String[] tactic4 = new String[]{tacticid4, section4,gfid4,gfname4,sdate4,edate4};
		jTable4Model.addRow(tactic4);
	}//总额赠送-添加
	
	private void jButton14ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton14.actionPerformed, event="+evt);
		int rowcount4 = jTable4.getRowCount();
		if(rowcount4==0){
			JOptionPane.showMessageDialog(this,"无法删除！ ");
			return;
		}
		jTable4Model.removeRow(rowcount4-1);
	}//总额赠送-撤消
	
	private void jButton15ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton15.actionPerformed, event="+evt);
		int rownum4 = jTable4.getRowCount();
		String[][] tgp4 = new String[rownum4][5];
		for(int i=0;i<rownum4;i++){
			tgp4[i][0]=jTable4.getValueAt(i, 0).toString();
			tgp4[i][1]=jTable4.getValueAt(i, 1).toString();
			tgp4[i][2]=jTable4.getValueAt(i, 2).toString();
			tgp4[i][3]=jTable4.getValueAt(i, 4).toString();
			tgp4[i][4]=jTable4.getValueAt(i, 5).toString();
			}
		Boolean result4 = pm.storeTGP(tgp4);
		if(result4){
			JOptionPane.showMessageDialog(this,"保存成功！ ");
			return;
		}
		else{
			JOptionPane.showMessageDialog(this,"保存失败！ ");
			return;
		}
	}//总额赠送-保存
	
	private void jButton18ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton18.actionPerformed, event="+evt);
		int rownum6 = jTable6.getRowCount();
		String[] rl = new String[rownum6];
		for(int p=0;p<rownum6;p++){
			rl[p]=jTable6.getValueAt(p, 0).toString();
			
			}
		Boolean result6 = pm.removal(rl);
		if(result6){
			JOptionPane.showMessageDialog(this,"保存成功！ ");
			return;
		}
		else{
			JOptionPane.showMessageDialog(this,"保存失败！ ");
			return;
		}
	}//移除策略-确认移除
	
	private void jButton17ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton17.actionPerformed, event="+evt);
		String[][] tacticlist = sc.getPromotionList() ;
		if(tacticlist.equals(null)){
			JOptionPane.showMessageDialog(this,"暂无策略！ ");
			return;
		}
		jTable5Model.setRowCount(0);
		int len = tacticlist.length;
		for(int i = 0;i<len;i++){
			jTable5Model.addRow(tacticlist[i]);
		}
	}//移除策略-显示所有策略
	
	private void jButton4ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton4.actionPerformed, event="+evt);
		Manager.main(null);
		this.dispose();
	}//返回
	
	private void jButton9ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton9.actionPerformed, event="+evt);
		Manager.main(null);
		this.dispose();
	}//返回
	
	
	
	private void jButton16ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton16.actionPerformed, event="+evt);
		Manager.main(null);
		this.dispose();
	}//返回
	
	private void jButton19ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton19.actionPerformed, event="+evt);
		Manager.main(null);
		this.dispose();
	}//返回
	
	private void jButton13ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton13.actionPerformed, event="+evt);
		Manager.main(null);
		this.dispose();
	}//返回

}
